<template>
  <div>
      <div class="title ">热销推荐</div>
      <ul>
        <router-link tag="li" class="item border-bottom" v-for="item in list" :key="item.id" :to="'/detail/'+ item.id">
          <img class="item-img" :src="item.imgUrl" alt="">
          <div class="item-info">
            <p class="item-title">{{item.title}}</p>
            <p class="item-desc">
              {{item.desc}}
            </p>
            <button class="item-button">查看详情</button>
          </div>
        </router-link>
      </ul>
  </div>
</template>

<script>
export default {
  name: 'HomeRecommend',
  props: {
    list: Array
  },
  data () {
    return {
      recommendList: [{
        id: '001',
        imgUrl: 'http://img1.qunarzz.com/sight/p0/201403/10/5d74b261e71f70dbbcfc5e18c40736e3.jpg_200x200_5f189914.jpg',
        title: '大连圣亚海洋世界',
        desc: '浪漫大连首站，浪漫的海洋主题公园'
      }, {
        id: '002',
        imgUrl: 'http://img1.qunarzz.com/sight/p0/1703/9d/9dd5987e5c7701f2a3.water.jpg_200x200_8b16531c.jpg',
        title: '北京圣亚海洋世界',
        desc: '浪漫北京首站，浪漫的海洋主题公园'
      }, {
        id: '003',
        imgUrl: 'http://img1.qunarzz.com/sight/p0/1505/a3/a36cc82c36e76b80.water.jpg_200x200_4fc1e49b.jpg',
        title: '厦门圣亚海洋世界',
        desc: '浪漫厦门首站，浪漫的海洋主题公园'
      }
      ]
    }
  }
}
</script>

<style scoped lang="stylus">
  @import "~styles/mixins.styl"
  .title
    margin-top:.2rem
    line-height .8rem
    background  #eee
    text-indent .2rem
  .item
    display flex
    padding: .1rem
   .item-img
     width:1.7rem
     height 1.7rem
   .item-info
     margin-left .2rem
     min-width 0
    .item-title
      margin-top: .1rem;
      height: .44rem;
      color: #212121;
      font-size: .32rem;
      line-height: .44rem;
      ellipse()
    .item-desc
      line-height .4rem
      color #ccc
      ellipse()
    .item-button
      margin-top .1rem
      background #ff9300
      padding 0 .2rem
      border-radius .06rem
      color #ffffff
      font-size .1rem
</style>
